package com.solo.eggsolo.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.solo.eggsolo.entity.Follow;
import com.solo.eggsolo.mapper.FollowMapper;
import com.solo.eggsolo.service.FollowService;
/**
 * 
 * @author Yu
 *
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class FollowServiceImpl extends BaseServiceImpl<Follow> implements FollowService {
	@Autowired
	private FollowMapper followMapper;
	
	/**
	 * 获取粉丝总数
	 * @param id
	 * @return
	 */
	@Override
	public Integer fansTotal(Integer id) {
		return followMapper.fansTotal(id);
	}
	
	/**
	 * 获取关注总数
	 * @param id
	 * @return
	 */
	@Override
	public Integer followsTotal(Integer id) {
		return followMapper.followsTotal(id);
	}
}
